package com.camp.socialtong.dao;

import java.util.List;

import org.springframework.dao.DataAccessException;
import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;

import com.camp.socialtong.model.SocialUsersModel;

public class SocialUsersDAOImpl extends SqlMapClientDaoSupport implements SocialUsersDAO {
	
	public void setQueryContext(String queryContext) {
		this.queryContext = queryContext;
	}

	String queryContext;
	
	public int insertForAll(SocialUsersModel socialUsersModel)
			throws DataAccessException {
		// TODO Auto-generated method stub
		return getSqlMapClientTemplate().update(queryContext + ".insertForAll", socialUsersModel);
	}

	public int updateForAll(SocialUsersModel socialUsersModel)
			throws DataAccessException {
		// TODO Auto-generated method stub
		return getSqlMapClientTemplate().update(queryContext + ".updateForAll", socialUsersModel);
	}

	public List selectForMe(SocialUsersModel socialUsersModel)
			throws DataAccessException {
		// TODO Auto-generated method stub
		return getSqlMapClientTemplate().queryForList(queryContext + ".selectForMe", socialUsersModel);
	}
}
